package com.xgggh.redpack.base.ui;

import android.os.Bundle;


import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import me.drakeet.multitype.Items;
import me.drakeet.multitype.MultiTypeAdapter;

public class BaseFragment extends Fragment {

    protected MultiTypeAdapter adapter = new MultiTypeAdapter();
    protected Items items = new Items();

    private static final int firstPage=1;
    private int currentPage=firstPage;
    protected static final int size=18;
    protected static final String sort="id,desc";

    protected int firstPage(){
        return firstPage;
    }

    protected int currentPage(){
        return currentPage;
    }
    protected void setCurrentPage(int page){
        currentPage=page;
    }

    protected int nextPage(){
        return currentPage+1;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //AndroidSupportInjection.inject(this);
    }

    public BaseActivity getBaseActivity(){
        return ((BaseActivity)getActivity());
    }

}
